var express = require('express'),
    app = express(),
    router = express.Router();

router.count = 0;
router.get('/get&param/:user', function(req, res, next){
	router.count ++;
	console.log(router.count);
});

router.param('user', function(req, res, id){
	router.count++;
	res.send({count: router.count});
	next();
});
//router.param 先于router.get 执行

app.use(router);
app.listen(3000);